﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;

namespace Aspfm.Factory
{
    public class FactoryObj
    {
        private static readonly dynamic dalClassObj = new NetProtectCoreClr().dalClassObj;
        public static void start(string[] args)
        {
            start1();

            //自定义启动代码
            //Aspfm.Factory.Main.Start.start(args);

        }
        public static void start1()
        {
            dalClassObj.path = path();
            dalClassObj.AspfmStart();
        }
        internal static string path()
        {
            string str = System.Reflection.Assembly.GetExecutingAssembly().CodeBase;
            int start = 8;// 去除file:///  
            int end = str.LastIndexOf('/');// 去除文件名xxx.dll及文件名前的/  
            str = str.Substring(start, end - start + 1);
            return str;
        }
        public static Type AspfmGetype(string filename, string classname)
        {
            return dalClassObj.AspfmGetype(filename,classname);
        }
    }
}
